Page({
  data: {
    projectAddress: 'https://gitee.com/he_qun/superpet_dog',
    github: 'https://gitee.com/he_qun/superpet_dog',
    email: '996695667@qq.com',
    qq: '996695667',
    cardCur: 0,
    swiperList: [{
      id: 0,
      type: 'image',
      url: 'cloud://pets-7guwp737b4dd6219.7065-pets-7guwp737b4dd6219-1304125172/banner/1605521068(1).jpg'
    }, {
      id: 1,
      type: 'image',
      url: 'cloud://pets-7guwp737b4dd6219.7065-pets-7guwp737b4dd6219-1304125172/banner/1605520984(1).jpg',
    }, {
      id: 2,
      type: 'image',
      url: 'cloud://pets-7guwp737b4dd6219.7065-pets-7guwp737b4dd6219-1304125172/banner/1605520938(1).jpg'
    }, {
      id: 3,
      type: 'image',
      url: 'cloud://pets-7guwp737b4dd6219.7065-pets-7guwp737b4dd6219-1304125172/banner/1605520920(1).jpg'
    }],
  },
  onLoad() { },
  copy(e) {
    let dataset = (e.currentTarget || {}).dataset || {}
    let title = dataset.title || ''
    let content = dataset.content || ''
    wx.setClipboardData({
      data: content,
      success() {
        wx.showToast({
          title: `已复制${title}`,
          duration: 2000,
        })
      },
    })
  },
  // cardSwiper
  cardSwiper(e) {
    this.setData({
      cardCur: e.detail.current
    })
  },
  showQrcode: function () {
    wx.previewImage({
      current: 'cloud://pets-7guwp737b4dd6219.7065-pets-7guwp737b4dd6219-1304125172/wx.png',
      urls: ['cloud://pets-7guwp737b4dd6219.7065-pets-7guwp737b4dd6219-1304125172/wx.png']
    })
  },
})